

    <!-- Top-level navigation -->
    <nav class="md-header-nav md-grid">
      <div class="md-flex">
  
        <!-- Link to home -->
        <div class="md-flex__cell md-flex__cell--shrink">
          <a href="{{ .Site.BaseURL }}"
              title="{{ .Site.Title }}"
              class="md-header-nav__button md-logo">
            {{if .Site.Params.icon}}
              <i class="md-icon">{{ .Site.Params.icon}}</i>
            {{else}}
              <img src="{{ .Site.Params.logo | absURL }}"  width="24" height="24" />
            {{end}}
          </a>
        </div>
  
        <!-- Button to toggle drawer -->
        <div class="md-flex__cell md-flex__cell--shrink">
          <label class="md-icon md-icon--menu md-header-nav__button"
              for="drawer"></label>
        </div>
  
        <!-- Header title -->
        <div class="md-flex__cell md-flex__cell--stretch">
          <div class="md-flex__ellipsis md-header-nav__title"
              data-md-component="title">
              {{if eq .Title .Site.Title}}
                {{.Title}}
              {{else}}
                <span class="md-header-nav__topic"> {{.Site.Title}}  </span>
                <span class="md-header-nav__topic">{{.Title}} </span> 
              {{end}}
          </div>
        </div>
  
        <!-- Button to open search dialogue -->
        <div class="md-flex__cell md-flex__cell--shrink">
          {{if .Site.Params.plugins.search}}
            <label class="md-icon md-icon--search md-header-nav__button"
            for="search"></label>
             <!-- TODO: search  -->
            {{end}} 
        </div>
  
        <!-- Repository containing source -->
        {{if .Site.Params.repo_url}} 
          <div class="md-flex__cell md-flex__cell--shrink">
            <div class="md-header-nav__source"> 
              {{ partial "source" .}} 
            </div>
          </div>
        {{end}}
      </div>
    </nav> 